package com.jr.entry;

import java.awt.print.Pageable;
import java.util.List;

public class PageDto<T> {
    private int page;
    private int size;
    private List<T> content;
    private long totalElements;
    private int totalPages;
    private int number;
    private int sizePerPage;

    public PageDto() {
    }

    public PageDto(int page, int size) {
        this.page = page;
        this.size = size;
    }

    public PageDto(int page, int size, List<T> content, long totalElements, int totalPages, int number, int sizePerPage) {
        this.page = page;
        this.size = size;
        this.content = content;
        this.totalElements = totalElements;
        this.totalPages = totalPages;
        this.number = number;
        this.sizePerPage = sizePerPage;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public List<T> getContent() {
        return content;
    }

    public void setContent(List<T> content) {
        this.content = content;
    }

    public long getTotalElements() {
        return totalElements;
    }

    public void setTotalElements(long totalElements) {
        this.totalElements = totalElements;
    }

    public int getTotalPages() {
        return totalPages;
    }

    public void setTotalPages(int totalPages) {
        this.totalPages = totalPages;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public int getSizePerPage() {
        return sizePerPage;
    }

    public void setSizePerPage(int sizePerPage) {
        this.sizePerPage = sizePerPage;
    }


    @Override
    public String toString() {
        return "PageDto{" +
                "page=" + page +
                ", size=" + size +
                ", content=" + content +
                ", totalElements=" + totalElements +
                ", totalPages=" + totalPages +
                ", number=" + number +
                ", sizePerPage=" + sizePerPage +
                '}';
    }
}
